const state={
    count:0,
    userInfo:{
        name:'zhangsan',
        age:18,
        height:1.88,
    }
}
const mutations={
    Addcount(state){
        state.count+=1;
    },
    setUserInfo(state,payload){
        state.userInfo=payload;
    },
    changename(state,payload){
        state.userInfo.name=payload; 
    }
}
const actions={
    addAction(context,payload){
        context.commit('add',payload);
    } 
}
const getters={
    bigname(state){
        return state.userInfo.name.toUpperCase();
    }

}
export default{
    namespaced:true,
    state,
    mutations,
    actions, 
    getters
}